package com.bawei.login

import android.content.IntentFilter
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.bawei.common.leakCanary.FileOperation
import com.bawei.common.leakCanary.LeakCanary
import com.bawei.common.leakCanary.MyAsyncTask
import com.bawei.common.leakCanary.MyBroadcastReceiver
import com.bawei.common.leakCanary.OuterClass


class QuickLoginActivity : AppCompatActivity() {
    private var asyncTask:MyAsyncTask?=null
    private val innerClass: OuterClass.InnerClass = OuterClass().InnerClass()
    private val receiver: MyBroadcastReceiver = MyBroadcastReceiver()
    private val fileOperation: FileOperation = FileOperation()
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_quick_login)

        LeakCanary.setInstance(this)

        innerClass.doSomething()

        asyncTask= MyAsyncTask().execute() as MyAsyncTask?

        val filter = IntentFilter()
        filter.addAction("com.example.ACTION")
        registerReceiver(receiver, filter)

        fileOperation.readFile()

    }
}